package com.agadmin.entity.user;


import com.agadmin.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

//因为使用了继承 所所以需要加上这个注解
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("user")
@ToString
public class Users extends BaseEntity {

    @NotBlank(message = "username can't be null")
    @NotNull(message = "username can't be null")
    private String userName;

    @NotNull(message = "password can't be null")
    @NotBlank(message = "password can't be null")
    private String password;
    private String roleName;
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
}
